home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Newton Sample Code 1.2 / Data Storage (Soups) / LostInSpaceCode / StorePart / StorePart.f next >
Encoding:
Text File  |  1994-03-23  |  1.1 KB  |  51 lines  |  [TEXT/MPS ]

  1. /*
  2. ** Copyright: © Michael S. Engber, 1994. All Rights Reserved.
  3. **
  4. ** StorePart.f
  5. **
  6. ** Creates a store part containing a soup for Data.f
  7. **
  8. */
  9.  
  10. Load(Home & ":Data.f");
  11.  
  12. call func()
  13. begin
  14.   local store := GetStores()[0];
  15.   
  16.   store:SetName("StorePartStore");
  17.   
  18.   local soup := store:CreateSoup("StorePartSoup",[{structure: 'slot, path: 'slot2, type: 'string}]);
  19.   
  20.   local i,elt;
  21.   foreach i,elt in gData do soup:Add(elt);
  22.   
  23. end with ();
  24.  
  25. /*
  26.  
  27. #parse this file's name
  28. begin
  29.     Set ®1 ""
  30.     Set ®2 ""
  31.     Set ®3 ""
  32.     Set ®4 ""
  33.     Evaluate "{Active}" =~ /((≈:)*)®1((≈)®2.(≈)®3)«0,1»(≈)®4/
  34. end > Dev:Null
  35. set activePath "{{®1}}"
  36. set activeFn   "{{®2}}{{®4}}"
  37. set activeExt  "{{®3}}"
  38.  
  39.  
  40. BuildPackage  -name "StorePart:Avarice" "{activePath}{activeFn}.pkg" "{active}" -type soup
  41. # BuildPackage starts: 3:01:27 PM
  42. #  built 'soup': "HD:DataStorage:StorePart:ARM-Objects:StorePart.mpt" -info "StorePart" 
  43. #
  44. #       name: "StorePart:Avarice"
  45. #    version: 1
  46. #  copyright: "© Copyright Apple Computer Inc., 1994. All Rights Reserved."
  47. #      flags: 
  48. #       size: 35012 bytes uncompressed
  49. # Build of "HD:DataStorage:StorePart:StorePart.pkg" complete at 3:01:47 PM
  50.  
  51.  */